/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 *
 * @author phuc
 */
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class Account {
    @PrimaryKey
    @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent private String username;
    @Persistent private String password;
    @Persistent private String role;

    

    public String getUsername()
    {
        return username;
    }
    public void setUsername(String user)
    {
        this.username = user;
    }
    public String getPassword()
    {
        return password;
    }
    public void setPassword(String pass)
    {
        this.password = pass;
    }
    public String getRole()
    {
        return role;
    }
    public void setRole(String role)
    {
        this.role = role;
    }

    // constructor
    public Account()
    {
        
    }
    public Account(Account acc)
    {
        this.username = acc.username;
        this.password = acc.password;
        this.role = acc.role;
    }
    public Account(String user, String pass, String role)
    {
        this.username = user;
        this.password = pass;
        this.role = role;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    
}
